package com.csproj.basic.service.dto;


import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;

/**
 * A DTO for the FixedReadingDevice entity.
 */
public class FixedReadingDeviceDTO implements Serializable {

    private String id;

    @NotNull(message = "固定式读取设备编号不能为空")
    private String deviceNo;

    private String siteId;

    private String siteName;

    private Boolean enableFlag;
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    /**
     * 启用原因
     */
    private String reason;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDeviceNo() {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo) {
        this.deviceNo = deviceNo;
    }

    public String getSiteId() {
        return siteId;
    }

    public void setSiteId(String siteId) {
        this.siteId = siteId;
    }

    public Boolean isEnableFlag() {
        return enableFlag;
    }

    public void setEnableFlag(Boolean enableFlag) {
        this.enableFlag = enableFlag;
    }
    public Boolean getEnableFlag(){
        return  this.enableFlag;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        FixedReadingDeviceDTO fixedReadingDeviceDTO = (FixedReadingDeviceDTO) o;
        if(fixedReadingDeviceDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), fixedReadingDeviceDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "FixedReadingDeviceDTO{" +
            "id=" + getId() +
            ", deviceNo='" + getDeviceNo() + "'" +
            ", siteId='" + getSiteId() + "'" +
            ", enableFlag='" + isEnableFlag() + "'" +
            "}";
    }

    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }
}
